package com.lulin.mall.order.fegin;

import com.lulin.mall.order.vo.MemberAddressVo;
import com.lulin.mall.order.vo.OrderItemVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


/**
 * 远程调用会员服务的接口
 *
 * @author lulin
 * @date 2022/12/22 10:36
 */
@FeignClient(name = "mall-member")
public interface MemberFeignService {
    /**
     * 根据会员编号，查询地址信息
     * 一个人，可能有多个收货地址
     *
     * @param memberId 会员编号
     */
    @GetMapping("/member/memberreceiveaddress/{memberId}/address")
    List<MemberAddressVo> getAddress(@PathVariable("memberId") Long memberId);

    /**
     * 根据收货地址id，获取地址信息
     */
    @RequestMapping("/member/memberreceiveaddress/getAddressById/{id}")
    MemberAddressVo getAddressById(@PathVariable("id") Long id);
}
